package com.longbo.demostudy.demo.charactor;

import com.longbo.demostudy.common.common.BaseController;
import com.longbo.demostudy.common.utils.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;

@RestController
@RequestMapping("/api/v1")
public class GoodsController extends BaseController {

    @Autowired
    IGoodsService goodsService;
    @RequestMapping(value = "/goods/{id}",method = RequestMethod.GET)
    public ApiResponse selectById(@PathVariable Integer id){
       Goods result = goodsService.selectById(id);
        return ApiResponse.success("成功",result);
    }

}
